<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head th:replace="lib :: common_header"></head>
    <body>
        <style>
            .el-table__expanded-cell[class*=cell] { padding: 0px 0px; } </style>
        <div th:replace="lib :: header_box"></div>
        <div th:replace="lib :: menu_box (421)"></div>

        <div class="main-box">
            <div class="main-container">
                <!-- 面包屑导航 -->
                <div class="row main-container-header">
                    <div class="col-md-12 rel">
                        <div class="main-container-header-line fix">
                            <div class="row">
                                <div class="col-xs-6 col-md-6"> <h4 class="g4">
                                    会员资产
                                </h4></div>
                                <div class="col-xs-6 col-md-6 tr f12">
                                    <div class="bread-link-box">
                                        当前位置：数据资产审批
                                        &nbsp;&gt;&nbsp;
                                        会员资产
                                    </div><!-- /bread-link-box -->
                                </div>
                            </div><!-- /row -->
                        </div><!-- main-container-header-line -->
                    </div>
                </div><!-- /main-container-header -->

                <div class="f14" id="app" v-cloak>
                    <br>
                    <template>
                        <el-tabs type="border-card" v-model="activeName" @tab-click="tabClick">
                            <el-tab-pane label="未审批" name="first">
                                <template>
                                    <el-table :data="projects"
                                              :show-header="false"
                                              :default-expand-all="true"
                                              style="width: 100%">
                                        <el-table-column type="expand">
                                            <template slot-scope="scope">
                                                <div style="padding:10px 20px;">
                                                    <table width="100%">
                                                        <tr v-for="(item, index) in scope.row.associators">
                                                            <td style="padding-left:50px; border:0;">
                                                                <div class="rel">
                                                                    <div class="pt5 pb5 rel">
                                                                        <i :id="'nima_' + scope.row.project.id + '_' + index" class="dn glyphicon glyphicon-send pushOut abs" style="font-size:70px; color:#67C23A;"></i>
                                                                        <span style="color:#ababab;">所属组织：{{ item.name }}</span>
                                                                    </div>
                                                                    <ul class="f12 b" style="margin:0;" v-for="asset in item.assets">
                                                                        <li class="pt5 pb5"><i class="el-icon-coin"></i> {{ asset.name }} &nbsp; [{{ asset.file_name }}]</li>
                                                                    </ul>

                                                                    <el-button class="abs"
                                                                               @click="sendMail2User(scope.row.project.id, item.id, 'nima_' + scope.row.project.id + '_' + index)"
                                                                               style="top:50%; margin-top:-14px; right:20px;"
                                                                               size="mini">
                                                                        数据拥有者审批
                                                                    </el-button>
                                                                </div>

                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column>
                                            <template scope="scope">
                                                申请项目：<span class="red b">{{ scope.row.project.name }}</span>
                                                <el-divider direction="vertical"></el-divider>
                                                <span class="ell">申请人：{{ scope.row.applicant.name }}</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column width="240">
                                            <template scope="scope">
                                                申请时间：{{ scope.row.applicant.created }}
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                </template>
                            </el-tab-pane>

                            <el-tab-pane label="已审批" name="second">
                                <table class="m_srchList" width="100%">
                                    <tr v-for="item in projects2">
                                        <td>
                                            <p>
                                                <span class="b">{{ item.name }}</span>
                                                <span> [ {{ item.file_name }} ]</span>
                                            </p>
                                            <p>
                                                <span class="f12">申请项目：<span class="red">{{ item.project.name }}</span> </span>
                                                <el-divider direction="vertical"></el-divider>
                                                <span class="f12">审批结果：</span>
                                                <el-tag type="success"
                                                        effect="dark"
                                                        size="mini">
                                                    {{ item.associator_approval_result | cvApprovalResult }}
                                                </el-tag>
                                            </p>
                                            <p>
                                                <span class="f12">申请人：{{ item.applicant.name }}</span>
                                                <el-divider direction="vertical"></el-divider>
                                                <span class="f12">审批时间：{{ item.associator_approval_date }}</span>
                                            </p>
                                        </td>
                                        <td width="100">
                                            <el-popover
                                                    placement="left"
                                                    title="查看审批明细"
                                                    width="300"
                                                    trigger="click">
                                                <table width="100%">
                                                    <tr>
                                                        <td class="pb10">会员审批意见：</td>
                                                        <td class="pb10">{{ item.associator_approval_comment }}</td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top" width="100">平台审批意见：</td>
                                                        <td>俺也一样！！</td>
                                                    </tr>
                                                </table>
                                                <el-button type="mini" slot="reference">查看审批意见</el-button>
                                            </el-popover>
                                        </td>
                                    </tr>
                                </table>
                            </el-tab-pane>
                        </el-tabs>
                    </template>

                </div><!-- /app -->
            </div>
        </div>
        <div th:replace="lib :: javascript_box"></div>
        <script th:src="@{/lib/console/asset_approval.js}"></script>
    </body>
</html>

